#include "BinaryTree.h"


BTNode* creatTree()
{
	BTNode* p1 = BuyNode(1);
	BTNode* p2 = BuyNode(2);
	BTNode* p3 = BuyNode(3);
	BTNode* p4 = BuyNode(4);
	BTNode* p5 = BuyNode(5);
	BTNode* p6 = BuyNode(6);
	//BTNode* p7 = BuyNode(7);

	p1->left = p2;
	p1->right = p4;
	p2->left = p3;
	//p2->right = p7;
	p4->left = p5;
	p4->right = p6;
	
	return p1;
}


int main()
{
	BTNode* pTree = creatTree();
	PrevOrder(pTree);
	printf("\n");
	InOrder(pTree);
	printf("\n");
	PostOrder(pTree);
	printf("\n");

	printf("%d\n", TreeSize(pTree));
	printf("%d\n", TreeHeight(pTree));
	printf("LevelOrder:\n");
	LevelOrder(pTree);

	TreeComplete(pTree);

	TreeDestory(pTree);
	pTree = NULL;
	return 0;
}